package id.go.bkn.sscn.persistence.entities;

// Generated Jun 17, 2014 3:07:46 PM by Hibernate Tools 3.4.0.CR1

import static javax.persistence.GenerationType.IDENTITY;

import id.go.bkn.sscn.manager.Constanta;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TabelPendaftar generated by hbm2java
 */
@Entity
@Table(name = "tabel_pendaftar", catalog = Constanta.DB_CATALOG)
public class TabelPendaftar implements java.io.Serializable {

	private Integer id;
	private String nik;
	private String nama;
	private String jenisKelamin;
	private String tempatLahir;
	private Date tglLahir;
	private RefInstansi refInstansi;
	private String email;
	private String idLogin;
	private String password;
	private Date tglDaftar;
	private Date createdAt;
	private Date updatedAt;
	private String noRegistrasi;
	private Integer jumlahDaftar;
	private Set<DtPendaftaran> dtPendaftarans = new HashSet<DtPendaftaran>(0);

	public TabelPendaftar() {
	}

	public TabelPendaftar(String nik, String nama, String jenisKelamin,
			String tempatLahir, Date tglLahir, RefInstansi idInstansi,
			String email, String idLogin, String password, Date tglDaftar,
			Date createdAt, Date updatedAt, String noRegistrasi,
			Integer jumlahDaftar, Set<DtPendaftaran> dtPendaftarans) {
		this.nik = nik;
		this.nama = nama;
		this.jenisKelamin = jenisKelamin;
		this.tempatLahir = tempatLahir;
		this.tglLahir = tglLahir;
		this.refInstansi = idInstansi;
		this.email = email;
		this.idLogin = idLogin;
		this.password = password;
		this.tglDaftar = tglDaftar;
		this.createdAt = createdAt;
		this.updatedAt = updatedAt;
		this.noRegistrasi = noRegistrasi;
		this.jumlahDaftar = jumlahDaftar;
		this.dtPendaftarans = dtPendaftarans;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "NIK", length = 18, unique = true, nullable = false)
	public String getNik() {
		return this.nik;
	}

	public void setNik(String nik) {
		this.nik = nik;
	}

	@Column(name = "nama", length = 500)
	public String getNama() {
		return this.nama;
	}

	public void setNama(String nama) {
		this.nama = nama;
	}

	@Column(name = "jenis_kelamin", length = 2)
	public String getJenisKelamin() {
		return this.jenisKelamin;
	}

	public void setJenisKelamin(String jenisKelamin) {
		this.jenisKelamin = jenisKelamin;
	}

	@Column(name = "tempat_lahir", length = 500)
	public String getTempatLahir() {
		return this.tempatLahir;
	}

	public void setTempatLahir(String tempatLahir) {
		this.tempatLahir = tempatLahir;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "tgl_lahir", length = 10)
	public Date getTglLahir() {
		return this.tglLahir;
	}

	public void setTglLahir(Date tglLahir) {
		this.tglLahir = tglLahir;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "ref_instansi", nullable = false)
	public RefInstansi getRefInstansi() {
		return this.refInstansi;
	}

	public void setRefInstansi(RefInstansi refInstansi) {
		this.refInstansi = refInstansi;
	}

	@Column(name = "email", length = 200)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "id_login", length = 200)
	public String getIdLogin() {
		return this.idLogin;
	}

	public void setIdLogin(String idLogin) {
		this.idLogin = idLogin;
	}

	@Column(name = "password", length = 60)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "tgl_daftar", length = 10)
	public Date getTglDaftar() {
		return this.tglDaftar;
	}

	public void setTglDaftar(Date tglDaftar) {
		this.tglDaftar = tglDaftar;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created_at", length = 19)
	public Date getCreatedAt() {
		return this.createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updated_at", length = 19)
	public Date getUpdatedAt() {
		return this.updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

	@Column(name = "no_registrasi", length = 10)
	public String getNoRegistrasi() {
		return this.noRegistrasi;
	}

	public void setNoRegistrasi(String noRegistrasi) {
		this.noRegistrasi = noRegistrasi;
	}

	@Column(name = "jumlah_daftar")
	public Integer getJumlahDaftar() {
		return this.jumlahDaftar;
	}

	public void setJumlahDaftar(Integer jumlahDaftar) {
		this.jumlahDaftar = jumlahDaftar;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "tabelPendaftar")
	public Set<DtPendaftaran> getDtPendaftarans() {
		return this.dtPendaftarans;
	}

	public void setDtPendaftarans(Set<DtPendaftaran> dtPendaftarans) {
		this.dtPendaftarans = dtPendaftarans;
	}

}
